home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Unix / satan-1.1.1 / rules / hosttype < prev    next >
Text File  |  1995-04-02  |  3KB  |  160 lines

  1. #
  2. # Rules that recognize host types from telnet/ftp/smtp banners. These are
  3. # applied to every telnet/ftp/sendmail record. Format of this file is:
  4. #
  5. #    CLASS class_name
  6. #    condition TABs hosttype
  7. #
  8. # Empty lines and text after a "#" character are ignored. Long lines may
  9. # be broken with backslash-newline.
  10. #
  11. # The class_name is used for the first rough breakdown by host type in,
  12. # for example, reports. It should be a major software category.
  13. # The condition is a PERL expression, with full access to the global
  14. # $target..$text variables; HOSTTYPE stands for the current hostname
  15. # info for the target host. UNKNOWN is true when the host type is unknown.
  16. #
  17. # The hosttype field is an expression that evaluates to a host type;
  18. # when it is absent, the value $1 is taken.
  19. #
  20. #
  21. # version 1, Sun Mar 26 18:39:56 1995, last mod by zen
  22. #
  23.  
  24. #
  25. # Beware: AIX 3.x telnetd claims to be version 3.
  26. #
  27. CLASS AIX
  28. /(AIX [.0-9]+)/
  29. /AIX Version ([.0-9]+)/                        "AIX $1"
  30. /AIX Version ([0-9]) / && length(HOSTTYPE) <= 3            "AIX $1"
  31. UNKNOWN && /(AIX)/
  32.  
  33. #
  34. # Beware: Ultrix 4.x ftpd claims to be version 4.1.
  35. #
  36. CLASS Ultrix
  37. /ultrix[\/v ]+([.0-9]+[A-Z]*)/i                    "Ultrix $1"
  38. /ultrix version 4/i && length(HOSTTYPE) <= 6            "Ultrix 4"
  39. UNKNOWN && /ultrix/i                        "Ultrix"
  40.  
  41. CLASS VMS
  42. /(VAX\/VMS)/
  43. /(OpenVMS)/
  44. UNKNOWN && /MultiNet/                        "VAX/VMS"
  45.  
  46. #
  47. # The first pattern is good for HP-UX 8.x and 9.x telnetd.
  48. #
  49. CLASS HP
  50. /(HP-UX) .+ ([AB1-7]\.[A-Za-z0-9.]+) /                "$1 $2"
  51. UNKNOWN && /(HP-UX)/
  52. UNKNOWN && /HP Sendmail/                    "HP-UX"
  53.  
  54. #
  55. # What about earlier IRIX versions?
  56. #
  57. CLASS SGI
  58. /IRIX System V.3/                        "IRIX 4"
  59. /IRIX System V.4/                        "IRIX 5"
  60. UNKNOWN && /\b(IRIX|SGI)\b/                    "IRIX"
  61.  
  62. #
  63. # SunOS 4.x ftpd and sendmail claim to be version 4.1
  64. # SunOS 5.x ftpd and telnetd claim to be generic SYSV40
  65. # SunOS 5.x will end up as "other" when they replaced sendmail
  66. #
  67. CLASS SUN
  68. UNKNOWN && /SunOS/                        "SunOS 4"
  69. /4.1\/SMI-4.1/                            "SunOS 4"
  70. /SMI-SVR4/                            "SunOS 5"
  71.  
  72. #
  73. # Domain/OS ftpd gives more specific version information than telnetd.
  74. #
  75. CLASS APOLLO
  76. /(Domain\/OS sr[.0-9]+)/ && length($1) > length(HOSTTYPE)
  77. UNKNOWN && /(Domain\/OS)/
  78. /Apollo/                            "Domain/OS"
  79.  
  80. #
  81. # Beware: NeXTStep 3.x ftp announces itself as NeXT 1.0.
  82. # Beware: NeXTStep 3.x sendmail announces itself as NX5.xx/NX3.0.
  83. #
  84. CLASS NEXT
  85. /NX.*\/NX([0-9]+)/                        "NeXTStep $1"
  86. UNKNOWN && /(NeXT)/                        "NeXTStep"
  87.  
  88. #
  89. # Data General
  90. #
  91. CLASS DG/UX
  92. UNKNOWN && /\b(DG\/UX)\b/                    $1
  93. /DG\/UX .* Release ([-\/A-Z0-9.]+)/                "DG/UX $1"
  94.  
  95. #
  96. # Linux
  97. #
  98. CLASS LINUX
  99. UNKNOWN && /(Linux)/
  100. /(Linux [0-9.]+)/
  101.  
  102. #
  103. # 4.4 BSD, BSDI, etc.
  104. #
  105. CLASS 4.4 BSD
  106. /(FreeBSD|NetBSD)/
  107. # e.g. BSDI BSD/386 1.1
  108. /(BSDI) BSD\/[0-9]+\s([0-9]+)/                    "$1 $2"
  109. # e.g. BSDI BSD/OS 2.0
  110. /(BSDI) BSD\/OS\s([0-9]+)/                    "$1 $2"
  111.  
  112. #
  113. # Apple A/UX
  114. #
  115. CLASS A/UX
  116. /A\/UX.([.0-9]+)/                        "A/UX $1"
  117. /(A\/UX)/
  118.  
  119. #
  120. # Sequent slipped by us!
  121. CLASS Sequent
  122. /(DYNIX\/ptx)/
  123. /DYNIX\(R\) (V[.0-9]+)/                        "DYNIX $1"
  124. /DYNIX/                                "Sequent/DYNIX"
  125.  
  126. #
  127. # Sony NEWS-OS
  128. CLASS SONY
  129. /NEWS-OS Release ([.0-9]+)/                    "NEWS-OS $1"
  130. /(NEWS-OS)/
  131.  
  132. #
  133. # Missed'em five
  134. #
  135. CLASS SYSTEM V
  136. UNKNOWN && /(System V) Release ([.0-9]+)/            "$1.$2"
  137. UNKNOWN && /(System V[.0-9]*)/
  138.  
  139. #
  140. # Not really mainstream, but...
  141. #
  142. CLASS OSF
  143. /OSF\/([.0-9]+)/                        "OSF $1"
  144.  
  145. #
  146. # Some of these still need some refinement.
  147. #
  148. CLASS other
  149. /(Macintosh|ConvexOS)/
  150. /(Windows NT|OS\/2)/
  151. /VersaTerm/                            "Macintosh"
  152. /(Codonics|APS-TI|Cray UNICOS)/
  153. /InfiniteStorage/                        "Epoch"
  154. /(PC\/TCP)/
  155. /(NetWare|NEWT)\s*[Vv]*([.0-9]*)/                "$1 $2"
  156. /\b(CMC)\b/
  157. /(Epoch|RTU) /
  158. /(IBM VM|IBM MVS)/
  159.